package com.ymatou.iapi.optrade.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.optrade.parameter.req.ChangeDeliveryInfoNotifyReq;
import com.ymatou.iapi.optrade.service.ChangeDeliveryInfoNotifyCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;

/**
 *  修改物流通知交易接口 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_ChangeDeliveryInfoNotify {

	private static ChangeDeliveryInfoNotifyReq changeDeliveryInfoNotifyReq;

	private static ChangeDeliveryInfoNotifyCall changeDeliveryInfoNotifyCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("修改物流通知交易接口");
	}

	@Before
	public void caseUp() {

		changeDeliveryInfoNotifyReq = new ChangeDeliveryInfoNotifyReq();
		changeDeliveryInfoNotifyCall = new ChangeDeliveryInfoNotifyCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(changeDeliveryInfoNotifyCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ChangeDeliveryInfoNotify_001() {
		Logger.start(true, "修改物流通知交易成功");
		try {
			changeDeliveryInfoNotifyReq.setOrderId(283432434);

			changeDeliveryInfoNotifyCall.setData(changeDeliveryInfoNotifyReq);
			changeDeliveryInfoNotifyCall.callService();

			Logger.verifyEquals("ok",
					changeDeliveryInfoNotifyCall.getReturnData(), "验证接口返回");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}
